package com.jkd.service.impl;

import com.github.pagehelper.PageHelper;
import com.jkd.mapper.BuildingMapper;
import com.jkd.model.pojo.Building;
import com.jkd.service.IBuildingService;
import com.jkd.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class BuildingServiceImpl implements IBuildingService {
    @Override
    public List<Building> selectAll() {
        SqlSession sqlSession = MyBatisUtil.getSqlSession();
        BuildingMapper buildingMapper = sqlSession.getMapper(BuildingMapper.class);
        List<Building> list = buildingMapper.selectAll();
        MyBatisUtil.closeSqlSession(sqlSession);
        return list;
    }
}
